﻿
namespace EasyNet.Solr.Commons.Params
{
    /// <summary>
    /// A collection of standard params used by Update handlers
    /// </summary>
    public struct UpdateParams
    {
        /// <summary>
        /// wait till the command has flushed
        /// </summary>
        public const string WAIT_FLUSH = "waitFlush";

        /// <summary>
        /// wait for the search to warm up
        /// </summary>
        public const string WAIT_SEARCHER = "waitSearcher";

        /// <summary>
        /// overwrite indexing fields
        /// </summary>
        public const string OVERWRITE = "overwrite";

        /// <summary>
        /// Commit everything after the command completes
        /// </summary>
        public const string COMMIT = "commit";

        /// <summary>
        /// Commit within a certain time period (in ms)
        /// </summary>
        public const string COMMITWITHIN = "commitWithin";

        /// <summary>
        /// Optimize the index and commit everything after the command completes
        /// </summary>
        public const string OPTIMIZE = "optimize";

        /// <summary>
        /// Rollback update commands
        /// </summary>
        public const string ROLLBACK = "rollback";

        /// <summary>
        /// Select the update processor chain to use.  A RequestHandler may or may not respect this parameter
        /// </summary>
        public const string UPDATE_CHAIN = "update.chain";

        /// <summary>
        /// If optimizing, set the maximum number of segments left in the index after optimization.  1 is the default (and is equivalent to calling 
        /// </summary>
        public const string MAX_OPTIMIZE_SEGMENTS = "maxSegments";
        public const string EXPUNGE_DELETES = "expungeDeletes";
    }
}
